:: (html_element -> [html_element]) -> ([html_element] -> [html_element]) -package:base-prelude package:relude

Map a function over all the elements of a container and concatenate the resulting lists.

Examples

Basic usage:
>>> concatMap (take 3) [[1..], [10..], [100..], [1000..]]
[1,2,3,10,11,12,100,101,102,1000,1001,1002]
>>> concatMap (take 3) (Just [1..])
[1,2,3]
For chaining monadic operations in forward applications using (&) Named version of =<<.
>>> Just [ 1 :: Int ] & chainedTo (viaNonEmpty head)
Just 1

>>> Nothing & chainedTo (viaNonEmpty head)
Nothing
Same as >>=, but with the arguments interchanged.